/*
 * QEventsAdapter.cpp  0.4.0 / Nov 17, 2010
 *
 * Copyright (c) 2010 - 2011, cute4j.com and contributors.
 *
 * This software is licensed under the LGPL version 2.1 license.
 * A copy of this license is included in the file LICENSE-LGPL.txt.
 */
#include "QEventsAdapter.h"

// SwingKeyTypedEvent :: Public Constructor. -----------------------------------

/*!
 * \brief Constructs new SwingKeyTypedEvent object.
 *
 * \param key the key code
 * \param modifiers the keyboard modifiers
 */
SwingKeyTypedEvent::SwingKeyTypedEvent(int key, Qt::KeyboardModifiers modifiers)
  : QKeyEvent(static_cast<Type>(SwingKeyTypedEvent::TYPE), key, modifiers)
{
  // empty body
}

/*!
 * \brief Constructs new SwingKeyTypedEvent object.
 *
 * \param ke the key event
 */
SwingKeyTypedEvent::SwingKeyTypedEvent(QKeyEvent *ke)
  : QKeyEvent(static_cast<Type>(SwingKeyTypedEvent::TYPE), ke->key(),
              ke->modifiers(), ke->text())
{
  // empty body
}

// SwingMouseClickedEvent :: Public Constructor. -------------------------------

/*!
 * \brief Constructs new SwingMouseClickedEvent object.
 *
 * \param position the mouse position
 * \param button the mouse button
 * \param buttons the mouse buttons
 * \param modifiers the keyboard modifiers
 */
SwingMouseClickedEvent::SwingMouseClickedEvent(const QPoint &position,
                                               Qt::MouseButton button,
                                               Qt::MouseButtons buttons,
                                               Qt::KeyboardModifiers modifiers)
  : QMouseEvent(static_cast<Type>(SwingMouseClickedEvent::TYPE), position,
                button, buttons, modifiers)
{
  // empty body
}

/*!
 * \brief Constructs new SwingMouseClickedEvent object.
 *
 * \param me the mouse event event
 */
SwingMouseClickedEvent::SwingMouseClickedEvent(QMouseEvent *me)
  : QMouseEvent(static_cast<Type>(SwingMouseClickedEvent::TYPE), me->pos(),
                me->button(), me->buttons(), me->modifiers())
{
  // empty body
}

